<#assign tagId="" >
<#assign tagName="" >
<#assign tagSeoName="" >
<#if obj??>
	<#if obj.type=='tag'>
		<#assign tagId="${obj.id}" >
		<#assign tagName="${obj.name}" >
		<#assign tagSeoName="${obj.seoName}" >
	</#if>
</#if>

<form name="tagForm" method="post" action="/admin/category" onsubmit="checkTag()">
	<input type="hidden" name="id" value="${tagId}">
	<input type="hidden" name="oper" value="save">
	<input type="hidden" name="type" value="tag" value="${tagSeoName}">
	
	<input type="text" name="name" class="box2" placeholder="新标签名字" value="${tagName}">
	<input type="text" name="seoName" class="box2" placeholder="新标签别名" value="${tagSeoName}">
	<input type="submit" class="com_btn" value="保存">
	<input type="button" class="com_btn" value="清空" onclick="clearTag()">
</form>

<div class="in">			
	<#if tags?has_content>
		<table border="0" cellspacing="0" cellpadding="10" class="table_main">
		  <tbody><tr style="background-color:#d9d8d8; font-size:14px;">
			<td style="padding: 14px;"><strong>名称</strong></td>
			<td style="padding: 14px;" width="250"><strong>别名</strong></td>
			<td style="padding: 14px;" width="100"><strong>文章</strong></td>
		  </tr>
		  <#list tags as tag>
			  <tr class="<#if tag_index%2==0>gray</#if>">
				<td>
					${tag.name}
					<div class="actions_wrapper">
					<div class="actions" style="display: none;">
						<a href="/admin/category?type=tags&id=${tag.id}">修改</a> |
						<a href="/admin/category?oper=delete&deleteType=tags&id=${tag.id}">删除</a>
					</div></div>
				</td>
				<td>${tag.seoName!}</td>
				<td>${tag.postCount}</td>
			  </tr>
		  </#list>
		</tbody></table>
		<p align="right">总数:${tags?size}</p>
	<#else>
  		<h2>还没有标签</h2>
	</#if>
</div>